<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- //设置按照edge浏览器渲染方式渲染 -->
<meta name="viewport"
	content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!-- //设置页面宽度，缩放比例，用户不能缩放 -->
<title>注册</title>
<link rel="stylesheet" href="../bootstrap/css/bootstrap.min.css">
<style>
input {
	outline: none;
	//
	去掉chrome浏览器输入框内的蓝色边框
}
</style>
</head>
<body ng-app="myApp">
	<div ng-controller="myCtr">
		<div class="container">
			<h2 class="text-center">注册系统</h2>

			<div class="row">
				<form name="myForm" class="form-horizontal" action="regist/parameter" method="post">
					<div class="form-group">
						<div class="col-xs-3 col-xs-offset-1">
							<lable for="username">用户名：</lable>
						</div>
						<div class="col-xs-8">
							<input id="username" type="text" ng-model="data.username"
								name="username" ng-required="true">
							<!-- //ng-required="true"是设置输入框内必须填写内容，下同 -->
						</div>
					</div>
					
				    <div class="form-group">
						  <div class="col-xs-3 col-xs-offset-1">
								<lable for="password">密码：</lable>
				 			</div>
							<div class="col-xs-8">
								<input id="password" type="text" ng-model="data.password"
									name="password" ng-required="true">
								<!-- //ng-required="true"是设置输入框内必须填写内容，下同 -->
						</div>
					</div>

					<div class="form-group">
							<div class="col-xs-3 col-xs-offset-1">
								<lable for="password_repeat">密码确认：</lable>
							</div>
							<div class="col-xs-8">
								<input id="password_repeat" type="text" ng-model="data.password_repeat"
									name="password_repeat" ng-required="true">
								<!-- //ng-required="true"是设置输入框内必须填写内容，下同 -->
							</div>
					</div>

					<div class="form-group">
						<div class="col-xs-3 col-xs-offset-1">
							<lable for="tel">电话：</lable>
						</div>
						<div class="col-xs-8">
							<input id="tel" type="text" ng-model="data.tel" name="tel"
								ng-pattern="/^1\d{10}$/" ng-required="true">
							<!-- //ng-pattren="/XXX/"是设置正则验证，下同 -->
						</div>

					</div>

					<div class="form-group">
						<div class="col-xs-3 col-xs-offset-1">
							<lable for="address">地址：</lable>
						</div>
						<div class="col-xs-8">
							<input id="address" type="text" ng-model="data.address"
								name="address" ng-required="true">
						</div>
					</div>
					
					<div class="form-group">
						<div class="col-xs-3 col-xs-offset-1">
							<lable for="email">邮箱：</lable>
						</div>
						<div class="col-xs-8">
							<input id="email" type="text" ng-model="data.email" name="email"
								ng-pattern="/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/"
								ng-required="true">
						</div>
					</div>
					
					<div class="col-xs-8 col-xs-offset-4 text-danger"
						style="height: 30px; overflow: hidden;">
						<p ng-show="myForm.username.$invalid && myForm.username.$dirty">请填写用户名</p>
						<p ng-show="myForm.tel.$invalid && myForm.tel.$dirty">请填写正确电话</p>
						<p ng-show="myForm.address.$invalid && myForm.address.$dirty">请填写地址</p>
						<p ng-show="myForm.password!=myForm.password_repeat">密码不一致</p>
						<p ng-show="myForm.email.$invalid && myForm.email.$dirty">请填写正确邮箱</p>
						<p ng-show="showAllErr">请填写</p>
					</div>
					
					<div class="form-group">
						<div class="col-xs-12">
							<input class="btn btn-success" type="submit" style="width: 80%;margin-left:10%;"
								ng-click="check()">
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
	<script src="../js/angular.1_4_6.min.js"></script>
</body>
</html>